package model.bo;

import java.sql.SQLException;
import java.util.ArrayList;

import model.bean.DongVatModel;
import model.bean.ThucVatModel;
import model.dao.ProcessDAO;

public class ProcessBO {
ProcessDAO processDAO = new ProcessDAO();
	
	public boolean checkLogin(String user, String password) throws SQLException{
		return processDAO.checkLogin(user, password);
	}
	
	public void dangKyTaiKhoan(String hoTenDK, String ngaySinh, String tenDangNhap, String matKhauDK) throws SQLException{
		processDAO.dangKyTaiKhoan(hoTenDK, ngaySinh, tenDangNhap, matKhauDK);
	}
	
	public ArrayList<DongVatModel> listInfoDongVat() throws SQLException{
		return processDAO.listInfoDongVat();
	}
	
	public ArrayList<ThucVatModel> listInfoThucVat() throws SQLException{
		return processDAO.listInfoThucVat();
	}
	
	public ArrayList<ThucVatModel> listPoinThucVat() throws SQLException{
		return processDAO.listPoinThucVat();
	}
	
	public ArrayList<DongVatModel> listPoinDongVat() throws SQLException{
		return processDAO.listPoinDongVat();
	}
	
	public void addThucvat(String tvloai, String tvho,
			String tvchieucao, String tvduongkinh, String tvloaisinhtruong,
			String tvdangsong, String tvdongtay, String tvnambac,
			double tvlatatude, double tvlongatude, boolean tvgtgo,
			boolean tvgtcanh, boolean tvgtthuoc, boolean tvgtvlxaydung,
			boolean tvgtthucongmynghe, boolean tvgtanduoc, boolean tvgtcaydoc,
			boolean tvgtchotinhdau, boolean tvgtnhua, boolean tvgtsoi,
			boolean tvgthuocnhuom, boolean tvgtcongdungkhac, String tvdacdiem, String tvimage)
			throws SQLException {
		processDAO.addThucvat(tvloai, tvho, tvchieucao, tvduongkinh,
				tvloaisinhtruong, tvdangsong, tvdongtay, tvnambac, tvlatatude,
				tvlongatude, tvgtgo, tvgtcanh, tvgtthuoc, tvgtvlxaydung,
				tvgtthucongmynghe, tvgtanduoc, tvgtcaydoc, tvgtchotinhdau,
				tvgtnhua, tvgtsoi, tvgthuocnhuom, tvgtcongdungkhac, tvdacdiem, tvimage);
	}
	
	public void addDongvat(String dvloai, String dvho,
			String dvgioi, String dvnganh, String dvlop,
			String dvbo, String dvchi, String dvthucan, String dvdacdiem,
			double dvlatatude, double dvlongatude, boolean dvnstrencan,
			boolean dvnstrencay, boolean dvnsduoinuoc, String dvimage) throws SQLException{
		processDAO.addDongvat(dvloai, dvho, dvgioi, dvnganh, dvlop, dvbo,
				dvchi, dvthucan, dvdacdiem, dvlatatude, dvlongatude,
				dvnstrencan, dvnstrencay, dvnsduoinuoc, dvimage);
	}
	
	public void addViTriThucVat(int tvid, double tvlatatude, double tvlongatude) throws SQLException{
		processDAO.addViTriThucVat(tvid, tvlatatude, tvlongatude);
	}
	
	public void addViTriDongVat(int dvid, double dvlatatude, double dvlongatude) throws SQLException{
		processDAO.addViTriDongVat(dvid, dvlatatude, dvlongatude);
	}
	
	public void deleteThucVat(double tvlatatude, double tvlongatude, int tvid, String tvho) throws SQLException{
		processDAO.deleteThucVat(tvlatatude, tvlongatude, tvid, tvho);
	}
	
	public void deleteDongVat(double dvlatatude, double dvlongatude, int dvid, String dvho) throws SQLException{
		processDAO.deleteDongVat(dvlatatude, dvlongatude, dvid, dvho);
	}
	
	public void editThucvat(int tvid, String tvloai, String tvho,
			String tvchieucao, String tvduongkinh, String tvloaisinhtruong,
			String tvdangsong, String tvdongtay, String tvnambac,
			double tvlatatude, double tvlatatudeold, double tvlongatude,
			double tvlongatudeold, boolean tvgtgo, boolean tvgtcanh,
			boolean tvgtthuoc, boolean tvgtvlxaydung,
			boolean tvgtthucongmynghe, boolean tvgtanduoc, boolean tvgtcaydoc,
			boolean tvgtchotinhdau, boolean tvgtnhua, boolean tvgtsoi,
			boolean tvgthuocnhuom, boolean tvgtcongdungkhac, String tvdacdiem, String tvimage)
			throws SQLException {
		processDAO.editThucvat(tvid, tvloai, tvho, tvchieucao, tvduongkinh,
				tvloaisinhtruong, tvdangsong, tvdongtay, tvnambac, tvlatatude,
				tvlatatudeold, tvlongatude, tvlongatudeold, tvgtgo, tvgtcanh,
				tvgtthuoc, tvgtvlxaydung, tvgtthucongmynghe, tvgtanduoc,
				tvgtcaydoc, tvgtchotinhdau, tvgtnhua, tvgtsoi, tvgthuocnhuom,
				tvgtcongdungkhac, tvdacdiem, tvimage);
	}
	
	public void editDongvat(int dvid, String dvloai, String dvho,
			String dvgioi, String dvnganh, String dvlop, String dvbo,
			String dvchi, String dvthucan, String dvdacdiem, double dvlatatude,
			double dvlatatudeold, double dvlongatude, double dvlongatudeold,
			boolean dvnstrencan, boolean dvnstrencay, boolean dvnsduoinuoc, String dvimage)
			throws SQLException {
		processDAO.editDongvat(dvid, dvloai, dvho, dvgioi, dvnganh, dvlop,
				dvbo, dvchi, dvthucan, dvdacdiem, dvlatatude, dvlatatudeold,
				dvlongatude, dvlongatudeold, dvnstrencan, dvnstrencay,
				dvnsduoinuoc, dvimage);
	}

}
